package control.informes;

import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import datos.Tarea;

public class ModeloInformeSemanal implements ModeloInforme {
	private List<Tarea> listaTareas = null;
	private Map<String, Date> tabla = null;

	public List<Tarea> getTareas() {
		return listaTareas;
	}

	public ModeloInformeSemanal(List<Tarea> j, Date d, Date h) {
		this.listaTareas = j;
		tabla = Collections.synchronizedMap(new HashMap<String, Date>());
		tabla.put("Desde", d);
		tabla.put("Hasta", h);
	}

	public Object getData(String key) {
		return tabla.get(key);
	}

	public Tarea getTarea(int index) {
		if (listaTareas == null)
			return null;
		return listaTareas.get(index);
	}

}
